﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;


namespace MyVocationSpace.AJAX
{
    public partial class CommentDetails : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            BAL.conn.connectionString = ConfigurationManager.ConnectionStrings["connectionstring"].ConnectionString;
            if (Request.QueryString["Comment"] != null && Request.QueryString["topicid"] != null &&
                Request.QueryString["IsMentor"] != null)
            {
                string comment = Request.QueryString["Comment"].ToString();
                int topicid =Convert.ToInt32( Request.QueryString["topicid"]);
                int IsMentor = Convert.ToInt32(Request.QueryString["IsMentor"]); 
                int res = BAL.Vocation.InsertCommentDetails(topicid, Convert.ToInt32(Session["UserID"]), comment);
                BAL.Vocation.SelectCommentDetails(topicid,IsMentor);
                //Response.Write("Your comment Record added successfully.");
            }
            Response.End();
        }
    }
}